import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 被护理人信息
 */
@Entity('nursing_person')
export class NursingPersonEntity extends BaseEntity {
  @Column({ comment: '姓名' })
  name: string;

  @Column({ comment: '性别', dict: ['未知', '男', '女'], default: "未知" })
  sex: string;

  @Column({ comment: '出生日期', type: 'date' })
  birthday: Date;

  @Column({ comment: '备注', nullable: true })
  remark: string;

  // 关联客户端用户，绑定家属关系
  @Index()
  @Column({ comment: '家属用户ID', nullable: true })
  familyUserId: number;
}
